Termination w.r.t. Q of the following Term Rewriting System could be proven:
Q restricted rewrite system:
The TRS R consists of the following rules:
from(X) → cons(X, n__from(s(X)))
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
sel(0, cons(X, Z)) → X
sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
from(X) → n__from(X)
first(X1, X2) → n__first(X1, X2)
activate(n__from(X)) → from(X)
activate(n__first(X1, X2)) → first(X1, X2)
activate(X) → X
Q is empty.
↳ QTRS
↳ DirectTerminationProof
Q restricted rewrite system:
The TRS R consists of the following rules:
from(X) → cons(X, n__from(s(X)))
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
sel(0, cons(X, Z)) → X
sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
from(X) → n__from(X)
first(X1, X2) → n__first(X1, X2)
activate(n__from(X)) → from(X)
activate(n__first(X1, X2)) → first(X1, X2)
activate(X) → X
Q is empty.
We use [23] with the following order to prove termination.
Lexicographic path order with status [19].
Quasi-Precedence:
0 > [from1, first2, nil, activate1] > s1 > [cons2, nfrom1, nfirst2]
sel2 > [from1, first2, nil, activate1] > s1 > [cons2, nfrom1, nfirst2]
Status: from1: [1]
sel2: [1,2]
first2: [2,1]
nfrom1: [1]
s1: [1]
0: multiset
nil: multiset
cons2: [1,2]
nfirst2: [2,1]
activate1: [1]